3.359 \(\int \cot ^2(e+f x) (b \sec (e+f x))^m \, dx\)

Optimal. Leaf size=59 \[ -\frac{\cot (e+f x) \cos ^2(e+f x)^{\frac{m-1}{2}} (b \sec (e+f x))^m \, _2F_1\left (-\frac{1}{2},\frac{m-1}{2};\frac{1}{2};\sin ^2(e+f x)\right )}{f} \]

[Out]

-(((Cos[e + f*x]^2)^((-1 + m)/2)*Cot[e + f*x]*Hypergeometric2F1[-1/2, (-1 + m)/2, 1/2, Sin[e + f*x]^2]*(b*Sec[
e + f*x])^m)/f)

________________________________________________________________________________________

Rubi [A]  time = 0.0370596, antiderivative size = 59, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.053, Rules used = {2617} \[ -\frac{\cot (e+f x) \cos ^2(e+f x)^{\frac{m-1}{2}} (b \sec (e+f x))^m \, _2F_1\left (-\frac{1}{2},\frac{m-1}{2};\frac{1}{2};\sin ^2(e+f x)\right )}{f} \]

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^2*(b*Sec[e + f*x])^m,x]

[Out]

-(((Cos[e + f*x]^2)^((-1 + m)/2)*Cot[e + f*x]*Hypergeometric2F1[-1/2, (-1 + m)/2, 1/2, Sin[e + f*x]^2]*(b*Sec[
e + f*x])^m)/f)

Rule 2617

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((a*Sec[e +
f*x])^m*(b*Tan[e + f*x])^(n + 1)*(Cos[e + f*x]^2)^((m + n + 1)/2)*Hypergeometric2F1[(n + 1)/2, (m + n + 1)/2,
(n + 3)/2, Sin[e + f*x]^2])/(b*f*(n + 1)), x] /; FreeQ[{a, b, e, f, m, n}, x] &&  !IntegerQ[(n - 1)/2] &&  !In
tegerQ[m/2]

Rubi steps

\begin{align*} \int \cot ^2(e+f x) (b \sec (e+f x))^m \, dx &=-\frac{\cos ^2(e+f x)^{\frac{1}{2} (-1+m)} \cot (e+f x) \, _2F_1\left (-\frac{1}{2},\frac{1}{2} (-1+m);\frac{1}{2};\sin ^2(e+f x)\right ) (b \sec (e+f x))^m}{f}\\ \end{align*}

Mathematica [C]  time = 21.6067, size = 4872, normalized size = 82.58 \[ \text{Result too large to show} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Cot[e + f*x]^2*(b*Sec[e + f*x])^m,x]

[Out]

(Cot[(e + f*x)/2]*Cot[e + f*x]^2*(b*Sec[e + f*x])^m*(Cos[(e + f*x)/2]^2*Sec[e + f*x])^m*(-(AppellF1[-1/2, m, -
m, 1/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*(Cos[e + f*x]*Sec[(e + f*x)/2]^2)^m) + 3*(Sec[(e + f*x)/2]^2)
^m*Tan[(e + f*x)/2]^2*((-4*AppellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Cos[(e + f*x)
/2]^2)/(3*AppellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*((-1 + m)*AppellF1[3/2, m,
 2 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + m*AppellF1[3/2, 1 + m, 1 - m, 5/2, Tan[(e + f*x)/2]^2,
 -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2) + AppellF1[1/2, m, -m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2
]/(3*AppellF1[1/2, m, -m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*m*(AppellF1[3/2, m, 1 - m, 5/2, Ta
n[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + AppellF1[3/2, 1 + m, -m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2
])*Tan[(e + f*x)/2]^2))))/(2*f*(-(Csc[(e + f*x)/2]^2*(Cos[(e + f*x)/2]^2*Sec[e + f*x])^m*(-(AppellF1[-1/2, m,
-m, 1/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*(Cos[e + f*x]*Sec[(e + f*x)/2]^2)^m) + 3*(Sec[(e + f*x)/2]^2
)^m*Tan[(e + f*x)/2]^2*((-4*AppellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Cos[(e + f*x
)/2]^2)/(3*AppellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*((-1 + m)*AppellF1[3/2, m
, 2 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + m*AppellF1[3/2, 1 + m, 1 - m, 5/2, Tan[(e + f*x)/2]^2
, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2) + AppellF1[1/2, m, -m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^
2]/(3*AppellF1[1/2, m, -m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*m*(AppellF1[3/2, m, 1 - m, 5/2, T
an[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + AppellF1[3/2, 1 + m, -m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^
2])*Tan[(e + f*x)/2]^2))))/4 + (Cot[(e + f*x)/2]*(Cos[(e + f*x)/2]^2*Sec[e + f*x])^m*(-((Cos[e + f*x]*Sec[(e +
 f*x)/2]^2)^m*(-(m*AppellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Ta
n[(e + f*x)/2]) - m*AppellF1[1/2, 1 + m, -m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*
Tan[(e + f*x)/2])) - m*AppellF1[-1/2, m, -m, 1/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*(Cos[e + f*x]*Sec[(
e + f*x)/2]^2)^(-1 + m)*(-(Sec[(e + f*x)/2]^2*Sin[e + f*x]) + Cos[e + f*x]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2]
) + 3*(Sec[(e + f*x)/2]^2)^(1 + m)*Tan[(e + f*x)/2]*((-4*AppellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan
[(e + f*x)/2]^2]*Cos[(e + f*x)/2]^2)/(3*AppellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]
+ 2*((-1 + m)*AppellF1[3/2, m, 2 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + m*AppellF1[3/2, 1 + m, 1
 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2) + AppellF1[1/2, m, -m, 3/2, Tan[(e +
f*x)/2]^2, -Tan[(e + f*x)/2]^2]/(3*AppellF1[1/2, m, -m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*m*(A
ppellF1[3/2, m, 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + AppellF1[3/2, 1 + m, -m, 5/2, Tan[(e +
f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2)) + 3*m*(Sec[(e + f*x)/2]^2)^m*Tan[(e + f*x)/2]^3*((-4*App
ellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Cos[(e + f*x)/2]^2)/(3*AppellF1[1/2, m, 1 -
 m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*((-1 + m)*AppellF1[3/2, m, 2 - m, 5/2, Tan[(e + f*x)/2]^
2, -Tan[(e + f*x)/2]^2] + m*AppellF1[3/2, 1 + m, 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e
+ f*x)/2]^2) + AppellF1[1/2, m, -m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]/(3*AppellF1[1/2, m, -m, 3/2,
 Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*m*(AppellF1[3/2, m, 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*
x)/2]^2] + AppellF1[3/2, 1 + m, -m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2)) + 3*(S
ec[(e + f*x)/2]^2)^m*Tan[(e + f*x)/2]^2*((4*AppellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]
^2]*Cos[(e + f*x)/2]*Sin[(e + f*x)/2])/(3*AppellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2
] + 2*((-1 + m)*AppellF1[3/2, m, 2 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + m*AppellF1[3/2, 1 + m,
 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2) - (4*Cos[(e + f*x)/2]^2*(-((1 - m)*
AppellF1[3/2, m, 2 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/3 +
 (m*AppellF1[3/2, 1 + m, 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)
/2])/3))/(3*AppellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*((-1 + m)*AppellF1[3/2,
m, 2 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + m*AppellF1[3/2, 1 + m, 1 - m, 5/2, Tan[(e + f*x)/2]^
2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2) + ((m*AppellF1[3/2, m, 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e +
f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/3 + (m*AppellF1[3/2, 1 + m, -m, 5/2, Tan[(e + f*x)/2]^2, -Tan[
(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/3)/(3*AppellF1[1/2, m, -m, 3/2, Tan[(e + f*x)/2]^2, -Tan[
(e + f*x)/2]^2] + 2*m*(AppellF1[3/2, m, 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + AppellF1[3/2, 1
 + m, -m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2) - (AppellF1[1/2, m, -m, 3/2, Tan[
(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*(2*m*(AppellF1[3/2, m, 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^
2] + AppellF1[3/2, 1 + m, -m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/
2] + 3*((m*AppellF1[3/2, m, 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f
*x)/2])/3 + (m*AppellF1[3/2, 1 + m, -m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(
e + f*x)/2])/3) + 2*m*Tan[(e + f*x)/2]^2*((-3*(1 - m)*AppellF1[5/2, m, 2 - m, 7/2, Tan[(e + f*x)/2]^2, -Tan[(e
 + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/5 + (6*m*AppellF1[5/2, 1 + m, 1 - m, 7/2, Tan[(e + f*x)/2]^
2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/5 + (3*(1 + m)*AppellF1[5/2, 2 + m, -m, 7/2, Tan[
(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/5)))/(3*AppellF1[1/2, m, -m, 3/2, Ta
n[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*m*(AppellF1[3/2, m, 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/
2]^2] + AppellF1[3/2, 1 + m, -m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2)^2 + (4*App
ellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Cos[(e + f*x)/2]^2*(2*((-1 + m)*AppellF1[3/
2, m, 2 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + m*AppellF1[3/2, 1 + m, 1 - m, 5/2, Tan[(e + f*x)/
2]^2, -Tan[(e + f*x)/2]^2])*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2] + 3*(-((1 - m)*AppellF1[3/2, m, 2 - m, 5/2, Ta
n[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/3 + (m*AppellF1[3/2, 1 + m, 1 - m,
 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/3) + 2*Tan[(e + f*x)/2]^2*
((-1 + m)*((-3*(2 - m)*AppellF1[5/2, m, 3 - m, 7/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^
2*Tan[(e + f*x)/2])/5 + (3*m*AppellF1[5/2, 1 + m, 2 - m, 7/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e
+ f*x)/2]^2*Tan[(e + f*x)/2])/5) + m*((-3*(1 - m)*AppellF1[5/2, 1 + m, 2 - m, 7/2, Tan[(e + f*x)/2]^2, -Tan[(e
 + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/5 + (3*(1 + m)*AppellF1[5/2, 2 + m, 1 - m, 7/2, Tan[(e + f*
x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/5))))/(3*AppellF1[1/2, m, 1 - m, 3/2, Tan[(
e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*((-1 + m)*AppellF1[3/2, m, 2 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f
*x)/2]^2] + m*AppellF1[3/2, 1 + m, 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2]^2)^2
)))/2 + (m*Cot[(e + f*x)/2]*(Cos[(e + f*x)/2]^2*Sec[e + f*x])^(-1 + m)*(-(AppellF1[-1/2, m, -m, 1/2, Tan[(e +
f*x)/2]^2, -Tan[(e + f*x)/2]^2]*(Cos[e + f*x]*Sec[(e + f*x)/2]^2)^m) + 3*(Sec[(e + f*x)/2]^2)^m*Tan[(e + f*x)/
2]^2*((-4*AppellF1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Cos[(e + f*x)/2]^2)/(3*AppellF
1[1/2, m, 1 - m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*((-1 + m)*AppellF1[3/2, m, 2 - m, 5/2, Tan[
(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + m*AppellF1[3/2, 1 + m, 1 - m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2
]^2])*Tan[(e + f*x)/2]^2) + AppellF1[1/2, m, -m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]/(3*AppellF1[1/2
, m, -m, 3/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*m*(AppellF1[3/2, m, 1 - m, 5/2, Tan[(e + f*x)/2]^2,
 -Tan[(e + f*x)/2]^2] + AppellF1[3/2, 1 + m, -m, 5/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/
2]^2)))*(-(Cos[(e + f*x)/2]*Sec[e + f*x]*Sin[(e + f*x)/2]) + Cos[(e + f*x)/2]^2*Sec[e + f*x]*Tan[e + f*x]))/2)
)

________________________________________________________________________________________

Maple [F]  time = 0.271, size = 0, normalized size = 0. \begin{align*} \int \left ( \cot \left ( fx+e \right ) \right ) ^{2} \left ( b\sec \left ( fx+e \right ) \right ) ^{m}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^2*(b*sec(f*x+e))^m,x)

[Out]

int(cot(f*x+e)^2*(b*sec(f*x+e))^m,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (b \sec \left (f x + e\right )\right )^{m} \cot \left (f x + e\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2*(b*sec(f*x+e))^m,x, algorithm="maxima")

[Out]

integrate((b*sec(f*x + e))^m*cot(f*x + e)^2, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\left (b \sec \left (f x + e\right )\right )^{m} \cot \left (f x + e\right )^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2*(b*sec(f*x+e))^m,x, algorithm="fricas")

[Out]

integral((b*sec(f*x + e))^m*cot(f*x + e)^2, x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (b \sec{\left (e + f x \right )}\right )^{m} \cot ^{2}{\left (e + f x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**2*(b*sec(f*x+e))**m,x)

[Out]

Integral((b*sec(e + f*x))**m*cot(e + f*x)**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (b \sec \left (f x + e\right )\right )^{m} \cot \left (f x + e\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2*(b*sec(f*x+e))^m,x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e))^m*cot(f*x + e)^2, x)